home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / osi / isode / dosisode / DOSISODE80.ZIP / ISODE8.WRK / UNIX / H / SYS / SIGNAL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-09  |  1.7 KB  |  61 lines

  1. #ifndef __SIGNAL__
  2. #define __SIGNAL__
  3.  
  4. #ifndef    NSIG
  5. #define NSIG    32        /* number of signals */
  6.  
  7. #define    SIGHUP    1        /* hangup */
  8. #define    SIGINT    2        /* interrupt */
  9. #define    SIGQUIT    3        /* quit */
  10. #define    SIGILL    4        /* illegal instruction (not reset when caught) */
  11. #define    SIGTRAP    5        /* trace trap (not reset when caught) */
  12. #define    SIGIOT    6        /* IOT instruction */
  13. #define    SIGEMT    7        /* EMT instruction */
  14. #define    SIGFPE    8        /* floating point exception */
  15. #define    SIGKILL    9        /* kill (cannot be caught or ignored) */
  16. #define    SIGBUS    10        /* bus error */
  17. #define    SIGSEGV    11        /* segmentation violation */
  18. #define SIGSYS    12        /* bad argument to system call */
  19. #define SIGPIPE    13        /* write to a pipe with no one to read it */
  20. #define SIGALRM    14        /* alarm clock */
  21. #define SIGTERM    15        /* software termination signal from kill */
  22.  
  23. #define SIGURG    16
  24. #define SIGTSTP    18
  25. #define SIGCHLD    20
  26. #define SIGIO    23
  27.  
  28.  
  29. struct    sigvec
  30. {
  31.     int    (*sv_handler)();    /* handler address */
  32.     int    sv_mask;        /* mask of signals to be blocked */
  33.     int    sv_onstack;        /* flag to indicate signal stack */
  34. };
  35.  
  36. struct    sigcontext
  37. {
  38.     int    sc_onstack;        /* signal stack flag to restore */
  39.     int    sc_mask;        /* signal mask to restore */
  40.     int    sc_sp;            /* stack pointerto restore */
  41.     int    sc_pc;            /* pc to return to */
  42.     int    sc_ps;            /* psl to restore */
  43. };
  44.  
  45. struct    sigstack
  46. {
  47.     char    *ss_sp;            /* signal stack pointer */
  48.     int    ss_onstack;        /* current status */
  49. };
  50.  
  51. #define    BADSIG    (int (*)())-1
  52. #define SIG_DFL ((void (*)(int)) 1)
  53. #define SIG_ERR ((void (*)(int)) -1)
  54. #define SIG_IGN (0)
  55. #define SIG_HOLD ((void (*)(int)) 3)
  56. #define SIG_RELEASE ((void (*)(int)) 5)
  57.  
  58. void (*signal (int sig, void (*func) (int))) (int);
  59. int raise (int sig);
  60. #endif    NSIG
  61. #endif __SIGNAL__